package org.finesys.common.netty.websocket.constants;

import io.netty.util.AttributeKey;
import org.finesys.common.netty.websocket.stomp.entity.StompSubscription;
import org.finesys.common.netty.websocket.support.NettySession;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * WebSocket attributeKey 常量类
 */
public class WebSocketAttributeKeyConstants {

    /**
     * 端点实例key
     */
    public static final AttributeKey<Object> WEB_SOCKET_KEY = AttributeKey.valueOf("WEBSOCKET_IMPLEMENT");

    /**
     * session key
     */
    public static final AttributeKey<NettySession> SESSION_KEY = AttributeKey.valueOf("WEBSOCKET_SESSION");

    /**
     * 端点路径key
     */
    public static final AttributeKey<String> PATH_KEY = AttributeKey.valueOf("WEBSOCKET_PATH");
    /**
     * websocket_uri_template
     */
    public static final AttributeKey<Map<String, String>> URI_TEMPLATE = AttributeKey.valueOf("WEBSOCKET_URI_TEMPLATE");
    /**
     * websocket_request_param
     */
    public static final AttributeKey<Map<String, List<String>>> REQUEST_PARAM = AttributeKey
            .valueOf("WEBSOCKET_REQUEST_PARAM");

    /**
     * 用户ID
     */
    public static final AttributeKey<Object> USER_ID = AttributeKey.valueOf("USER_ID");

    /**
     * 端点路径key
     */
    public static final AttributeKey<Set<StompSubscription>> DESTINATIONS = AttributeKey.valueOf("DESTINATIONS");


}
